<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>新增</title>

	

  </head>
  <link rel="styleSheet" href="<%=request.getContextPath()%>/background/css/body.css" type="text/css" media="all" />
  <body>
    	<script language="javascript">
    function validate(form)
    {  
       
       if(form.user_name.value.length==0){
            alert("用户名不能为空！");
            form.user_name.focus();
            return false
            }
       if(form.article_name.value.length==0){
            alert("文章名不能为空！");
            form.article_name.focus();
            return false;
            }
    } 
    </script>

		<center>
		<br/><br/><br/>
			<form method="post" action="/myblog/servlet/AddArticleServlet"
				onsubmit="return validate(this)">
				<table>
    	<caption>新增文章信息</caption>
    	    <tr>
    			<td>用户名：</td>
    			<td><input type="text" name="user_name" value="" ></td>
    		</tr>
    		<tr>
    			<td>文章名：</td>
    			<td><input type="text" name="article_name" value="" ></td>
    		</tr>
    		<tr>
    			<td>文章内容：</td>
    			
    			<td><textarea name="article_content" rows="10" cols="80"> 
    			</textarea></td>
    		</tr>

    	</table>
    			<input type="submit" name="submit" value="提交" />
    			
    		     <input type="reset" name="reset" value="重写" />
    		

				
				

				
				
			</form>
		</center>
  </body>
</html>